import requests from '../common/request'

export function queryNearbyShopList(data) {
  return requests.post( {
    url: '/booking_mobile/booking_shop/query_nearby_shop_list',
    data: data
  })
}

export function getShopDetail(data) {
  return requests.get( {
    url: '/booking_mobile/booking_shop/shop_detail',
    data: data
  })
}

export function queryProductList(data) {
  return requests.post( {
    url: '/booking_mobile/product/query_list',
    data: data
  })
}
export function getBookingDetail(data) {
  return requests.post( {
    url: '/booking_mobile/product/detail',
    data: data
  })
}
export function bookingPreOrder(data) {
  return requests.post( {
    url: '/booking_mobile/product/pre_order',
    data: data
  })
}
export function createOrder(data) {
  return requests.post( {
    url: '/booking_mobile/booking_order/create_order',
    data: data
  })
}
export function balancePay(data) {
  return requests.post( {
    url: '/booking_mobile/booking_order/balancePay',
    data: data
  })
}

export function directPay(data) {
  return requests.post( {
    url: '/booking_mobile/booking_order/direct_pay',
    data: data
  })
}
export function getWxPrepay(data) {
  return requests.post( {
    url: '/booking_mobile/booking_order/get_wechat_pre_pay',
    data: data
  })
}
export function queryOrderStatus(data) {
  return requests.get( {
    url: '/booking_mobile/booking_order/query_order_status',
    data: data
  })
}
export function getOrderDetail(data) {
  return requests.get( {
    url: '/booking_mobile/booking_order/order_detail',
    data: data
  })
}
export function cancelOrder(data) {
  return requests.post( {
    url: '/booking_mobile/booking_order/cancel_order',
    data: data
  })
}

export function getOrderQrcode(data) {
  return requests.get( {
    url: '/booking_mobile/booking_order/get_order_qrcode',
    data: data
  })
}
export function queryOrderList(data) {
  return requests.post( {
    url: '/order_mobile/base/query_order_list',
    data: data
  })
}


export function getTags(data) {
  return requests.get( {
    url: '/booking_mobile/product/tags',
    data: data
  })
}

// 轮询订单状态
export function pollOrder(data) {
  return requests.get( {
    url: '/booking_mobile/booking_order/getWriteOffStatus',
    data: data
  })
}

// 获取订单状态
export function checkProtectTime(data) {
  return requests.get( {
    url: '/booking_mobile/booking_order/checkProtectTime',
    data: data
  })
}


